<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{%macro formFields(form)%}
{%for field in form%}
<p>
    {%if field.type not in ['HiddenField', 'SubmitField', 'CSRFTokenField'] %}
        {{field.label}}
        {{field}}
         {# 错误信息紧跟在对应字段后面 #}
            {% if field.errors %}
                {% for error in field.errors %}
                    <span class="error-message">{{ error }}</span>
                {% endfor %}
            {% endif %}
    {%endif %}
</p>
{%endfor%}
{%endmacro%}
</body>
</html>